<script lang="ts">
export default {
  name: "XText",
};
</script>
<script setup lang="ts">
import { ref } from "vue";
const props = defineProps<{ hide: Function; data: any }>();
const handleConfirm = () => {
  console.log("发送请求.....");
  console.log(props.data);
};
const aaa = ref(0);
defineExpose({
  handleConfirm,
});
</script>

<template>
  <h1>Hello vue3 + ts👍</h1>
  <div>名字:张三</div>
  <div>{{ aaa }}</div>
  <el-form label-width="100px">
    <el-form-item label="订单1:">{{ data.order1 }}</el-form-item>
    <el-form-item label="订单2:">{{ data.order2 }}</el-form-item>
  </el-form>
  <div class="footer">
    <el-button @click="hide">关闭</el-button>
    <el-button type="primary" @click="handleConfirm">确定</el-button>
  </div>
</template>

<style lang="less" scoped>
.footer {
  margin-top: 200px;
}
</style>
<style>
.demo-image__error .image-slot {
  font-size: 30px;
}
.demo-image__error .image-slot .el-icon {
  font-size: 30px;
}
.demo-image__error .el-image {
  width: 100%;
  height: 200px;
}
</style>
